<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Actions</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Actions' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../intern.html">Inter Modules</a></li><li><a href="index.html">pipeline</a></li><li><a href="index.html#5">Chapter 5: Synoptic Module</a></li><li><b>Actions</b></li></ul></div>
<p class="purpose">To compile the main/synoptic/actions submodule.</p>

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>Our inventory <span class="extract"><span class="extract-syntax">inv</span></span> already contains a list <span class="extract"><span class="extract-syntax">inv-&gt;action_nodes</span></span> of all packages
in the tree with type <span class="extract"><span class="extract-syntax">_action</span></span>.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">SynopticActions::compile</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">SynopticActions::compile</span></span>:<br/>Make Synoptic Module Stage - <a href="5-msms.html#SP1">&#167;1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_tree</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="reserved-syntax">pipeline_step</span><span class="plain-syntax"> *</span><span class="identifier-syntax">step</span><span class="plain-syntax">, </span><span class="reserved-syntax">tree_inventory</span><span class="plain-syntax"> *</span><span class="identifier-syntax">inv</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">InterNodeList::array_len</span><span class="plain-syntax">(</span><span class="identifier-syntax">inv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="5-act2.html#SP1_1" class="named-paragraph-link"><span class="named-paragraph">Assign unique action ID numbers</span><span class="named-paragraph-number">1.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="5-act2.html#SP1_2" class="named-paragraph-link"><span class="named-paragraph">Define CCOUNT_ACTION_NAME</span><span class="named-paragraph-number">1.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="5-act2.html#SP1_3" class="named-paragraph-link"><span class="named-paragraph">Define AD_RECORDS</span><span class="named-paragraph-number">1.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">InterNodeList::array_len</span><span class="plain-syntax">(</span><span class="identifier-syntax">inv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="5-act2.html#SP1_4" class="named-paragraph-link"><span class="named-paragraph">Define ACTIONHAPPENED array</span><span class="named-paragraph-number">1.4</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="5-act2.html#SP1_5" class="named-paragraph-link"><span class="named-paragraph">Define ACTIONCODING array</span><span class="named-paragraph-number">1.5</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="5-act2.html#SP1_6" class="named-paragraph-link"><span class="named-paragraph">Define ACTIONDATA array</span><span class="named-paragraph-number">1.6</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="5-act2.html#SP1_7" class="named-paragraph-link"><span class="named-paragraph">Define DB_ACTION_DETAILS function</span><span class="named-paragraph-number">1.7</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP1_1" class="paragraph-anchor"></a><b>&#167;1.1. </b>Each action package contains a numeric constant with the symbol name <span class="extract"><span class="extract-syntax">action_id</span></span>.
We want to ensure that these ID numbers are contiguous from 0 and never duplicated,
so we change the values of these constants accordingly.
</p>

<p class="commentary">In addition, each action has an ID used to identify itself as the owner of a slate
of variables, and we set this to the action ID plus 20000. (This scheme assumes
there are never more than 10000 rules, or 10000 activities, or 10000 actions.)
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Assign unique action ID numbers</span><span class="named-paragraph-number">1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">InterNodeList::array_sort</span><span class="plain-syntax">(</span><span class="identifier-syntax">inv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">, </span><a href="5-msms.html#SP7" class="function-link"><span class="function-syntax">MakeSynopticModuleStage::module_order</span></a><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="function-syntax">&lt;InterNodeList::array_len(inv-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">); </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pack</span><span class="plain-syntax"> =</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">PackageInstruction::at_this_head</span><span class="plain-syntax">(</span><span class="identifier-syntax">inv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">list</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="identifier-syntax">node</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">D</span><span class="plain-syntax"> = </span><a href="5-su.html#SP1" class="function-link"><span class="function-syntax">Synoptic::get_definition</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"action_id"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">ConstantInstruction::set_constant</span><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">InterValuePairs::number</span><span class="plain-syntax">((</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">i</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">D</span><span class="plain-syntax"> = </span><a href="5-su.html#SP2" class="function-link"><span class="function-syntax">Synoptic::get_optional_definition</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"var_id"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">D</span><span class="plain-syntax">) </span><span class="identifier-syntax">ConstantInstruction::set_constant</span><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">InterValuePairs::number</span><span class="plain-syntax">((</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">i</span><span class="plain-syntax">+20000));</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="5-act2.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2" class="paragraph-anchor"></a><b>&#167;1.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Define CCOUNT_ACTION_NAME</span><span class="named-paragraph-number">1.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">iname</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HierarchyLocations::iname</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">CCOUNT_ACTION_NAME_HL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Produce::numeric_constant</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">iname</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">InterNodeList::array_len</span><span class="plain-syntax">(</span><span class="identifier-syntax">inv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">));</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="5-act2.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_3" class="paragraph-anchor"></a><b>&#167;1.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Define AD_RECORDS</span><span class="named-paragraph-number">1.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">iname</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HierarchyLocations::iname</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">AD_RECORDS_HL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Produce::numeric_constant</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">iname</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">InterNodeList::array_len</span><span class="plain-syntax">(</span><span class="identifier-syntax">inv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">));</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="5-act2.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_4" class="paragraph-anchor"></a><b>&#167;1.4. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Define ACTIONHAPPENED array</span><span class="named-paragraph-number">1.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">iname</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HierarchyLocations::iname</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">ACTIONHAPPENED_HL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP7" class="function-link"><span class="function-syntax">Synoptic::begin_array</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">step</span><span class="plain-syntax">, </span><span class="identifier-syntax">iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="function-syntax">&lt;=(InterNodeList::array_len(inv-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">)/16); </span><span class="identifier-syntax">i</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">        </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP7" class="function-link"><span class="function-syntax">Synoptic::end_array</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="5-act2.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_5" class="paragraph-anchor"></a><b>&#167;1.5. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Define ACTIONCODING array</span><span class="named-paragraph-number">1.5</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">iname</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HierarchyLocations::iname</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">ACTIONCODING_HL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP7" class="function-link"><span class="function-syntax">Synoptic::begin_array</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">step</span><span class="plain-syntax">, </span><span class="identifier-syntax">iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="function-syntax">&lt;InterNodeList::array_len(inv-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">); </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pack</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PackageInstruction::at_this_head</span><span class="plain-syntax">(</span><span class="identifier-syntax">inv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">list</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="identifier-syntax">node</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::optional_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^double_sharp"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">no</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::read_optional_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^no_coding"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">no</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)) </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::symbol_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP7" class="function-link"><span class="function-syntax">Synoptic::end_array</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="5-act2.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_6" class="paragraph-anchor"></a><b>&#167;1.6. </b>The access possibilities for the noun and second are as follows:
</p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">UNRESTRICTED_ACCESS</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span><span class="plain-syntax"> </span><span class="comment-syntax"> question not meaningful, e.g. for a number</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">DOESNT_REQUIRE_ACCESS</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span><span class="plain-syntax"> </span><span class="comment-syntax"> actor need not be able to touch this object</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">REQUIRES_ACCESS</span><span class="plain-syntax"> </span><span class="constant-syntax">3</span><span class="plain-syntax"> </span><span class="comment-syntax"> actor must be able to touch this object</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">REQUIRES_POSSESSION</span><span class="plain-syntax"> </span><span class="constant-syntax">4</span><span class="plain-syntax"> </span><span class="comment-syntax"> actor must be carrying this object</span>
</pre>
<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Define ACTIONDATA array</span><span class="named-paragraph-number">1.6</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">iname</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HierarchyLocations::iname</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">ACTIONDATA_HL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP7" class="function-link"><span class="function-syntax">Synoptic::begin_bounded_array</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">step</span><span class="plain-syntax">, </span><span class="identifier-syntax">iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="function-syntax">&lt;InterNodeList::array_len(inv-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">); </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pack</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PackageInstruction::at_this_head</span><span class="plain-syntax">(</span><span class="identifier-syntax">inv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">list</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="identifier-syntax">node</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::optional_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^double_sharp"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Metadata::read_optional_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^action_assimilated"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax">) </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::symbol_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">            </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(</span><span class="constant-syntax">0x38</span><span class="plain-syntax">); </span><span class="comment-syntax"> out of world, can have noun, can have second</span>
<span class="plain-syntax">            </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">            </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">            </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::symbol_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">out_of_world</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::read_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^out_of_world"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">requires_light</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::read_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^requires_light"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">can_have_noun</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::read_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^can_have_noun"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">can_have_second</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::read_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^can_have_second"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun_access</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::read_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^noun_access"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">second_access</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::read_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^second_access"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">noun_kind</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::required_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^noun_kind"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">second_kind</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::required_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^second_kind"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">mn</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">ms</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">ml</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">mnp</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="identifier-syntax">msp</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="identifier-syntax">hn</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">hs</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">requires_light</span><span class="plain-syntax">) </span><span class="identifier-syntax">ml</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">noun_access</span><span class="plain-syntax"> == </span><span class="constant-syntax">REQUIRES_ACCESS</span><span class="plain-syntax">) </span><span class="identifier-syntax">mn</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">second_access</span><span class="plain-syntax"> == </span><span class="constant-syntax">REQUIRES_ACCESS</span><span class="plain-syntax">) </span><span class="identifier-syntax">ms</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">noun_access</span><span class="plain-syntax"> == </span><span class="constant-syntax">REQUIRES_POSSESSION</span><span class="plain-syntax">) { </span><span class="identifier-syntax">mn</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="identifier-syntax">hn</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">second_access</span><span class="plain-syntax"> == </span><span class="constant-syntax">REQUIRES_POSSESSION</span><span class="plain-syntax">) { </span><span class="identifier-syntax">ms</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="identifier-syntax">hs</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">can_have_noun</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">mnp</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">can_have_second</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">msp</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">bitmap</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) (</span><span class="identifier-syntax">mn</span><span class="plain-syntax"> + </span><span class="identifier-syntax">ms</span><span class="plain-syntax">*</span><span class="constant-syntax">0x02</span><span class="plain-syntax"> + </span><span class="identifier-syntax">ml</span><span class="plain-syntax">*</span><span class="constant-syntax">0x04</span><span class="plain-syntax"> + </span><span class="identifier-syntax">mnp</span><span class="plain-syntax">*</span><span class="constant-syntax">0x08</span><span class="plain-syntax"> +</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">msp</span><span class="plain-syntax">*</span><span class="constant-syntax">0x10</span><span class="plain-syntax"> + (</span><span class="identifier-syntax">out_of_world</span><span class="plain-syntax">?1:0)*</span><span class="constant-syntax">0x20</span><span class="plain-syntax"> + </span><span class="identifier-syntax">hn</span><span class="plain-syntax">*</span><span class="constant-syntax">0x40</span><span class="plain-syntax"> + </span><span class="identifier-syntax">hs</span><span class="plain-syntax">*</span><span class="constant-syntax">0x80</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">bitmap</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::symbol_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">noun_kind</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::symbol_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">second_kind</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc_s</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::optional_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^var_creator"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vc_s</span><span class="plain-syntax">) </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::symbol_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">((</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) (20000 + </span><span class="identifier-syntax">i</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP8" class="function-link"><span class="function-syntax">Synoptic::numeric_entry</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP7" class="function-link"><span class="function-syntax">Synoptic::end_array</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="5-act2.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_7" class="paragraph-anchor"></a><b>&#167;1.7. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Define DB_ACTION_DETAILS function</span><span class="named-paragraph-number">1.7</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">iname</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HierarchyLocations::iname</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">DB_ACTION_DETAILS_HL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP5" class="function-link"><span class="function-syntax">Synoptic::begin_function</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">act_s</span><span class="plain-syntax"> = </span><a href="5-su.html#SP6" class="function-link"><span class="function-syntax">Synoptic::local</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"act"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">n_s</span><span class="plain-syntax"> = </span><a href="5-su.html#SP6" class="function-link"><span class="function-syntax">Synoptic::local</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">s_s</span><span class="plain-syntax"> = </span><a href="5-su.html#SP6" class="function-link"><span class="function-syntax">Synoptic::local</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"s"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">for_say_s</span><span class="plain-syntax"> = </span><a href="5-su.html#SP6" class="function-link"><span class="function-syntax">Synoptic::local</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"for_say"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Produce::inv_primitive</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">SWITCH_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Produce::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Produce::val_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><span class="identifier-syntax">act_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Produce::code</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Produce::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="function-syntax">&lt;InterNodeList::array_len(inv-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">); </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pack</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PackageInstruction::at_this_head</span><span class="plain-syntax">(</span><span class="identifier-syntax">inv</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_nodes</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">list</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="identifier-syntax">node</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">debug_fn_s</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::optional_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^debug_fn"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::optional_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^double_sharp"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Produce::inv_primitive</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">CASE_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Produce::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Produce::val_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Produce::code</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Produce::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">debug_fn_s</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">Produce::inv_call_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">debug_fn_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">Produce::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                            </span><span class="identifier-syntax">Produce::val_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><span class="identifier-syntax">n_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                            </span><span class="identifier-syntax">Produce::val_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><span class="identifier-syntax">s_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                            </span><span class="identifier-syntax">Produce::val_symbol</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><span class="identifier-syntax">for_say_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">Produce::up</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">Produce::inv_primitive</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">PRINT_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">Produce::down</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                            </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                            </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">, </span><span class="string-syntax">"performing kit action %S"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                                </span><span class="identifier-syntax">InterSymbol::identifier</span><span class="plain-syntax">(</span><span class="identifier-syntax">double_sharp_s</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                            </span><span class="identifier-syntax">Produce::val_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">S</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                            </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">Produce::up</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    }</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Produce::up</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Produce::up</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">        </span><span class="identifier-syntax">Produce::up</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Produce::up</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="5-su.html#SP5" class="function-link"><span class="function-syntax">Synoptic::end_function</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">step</span><span class="plain-syntax">, </span><span class="identifier-syntax">iname</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="5-act2.html#SP1">&#167;1</a>.</li></ul>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="5-act.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-pm.html">1</a></li><li class="progresschapter"><a href="2-pp.html">2</a></li><li class="progresschapter"><a href="3-ps.html">3</a></li><li class="progresschapter"><a href="4-lbks.html">4</a></li><li class="progresscurrentchapter">5</li><li class="progresssection"><a href="5-msms.html">msms</a></li><li class="progresssection"><a href="5-sh.html">sh</a></li><li class="progresssection"><a href="5-su.html">su</a></li><li class="progresssection"><a href="5-ext.html">ext</a></li><li class="progresssection"><a href="5-lt.html">lt</a></li><li class="progresssection"><a href="5-rsp.html">rsp</a></li><li class="progresssection"><a href="5-rls.html">rls</a></li><li class="progresssection"><a href="5-act.html">act</a></li><li class="progresscurrent">act2</li><li class="progresssection"><a href="5-ins.html">ins</a></li><li class="progresssection"><a href="5-dlg.html">dlg</a></li><li class="progresssection"><a href="5-knd.html">knd</a></li><li class="progresssection"><a href="5-prp.html">prp</a></li><li class="progresssection"><a href="5-rlt.html">rlt</a></li><li class="progresssection"><a href="5-tbl.html">tbl</a></li><li class="progresssection"><a href="5-chr.html">chr</a></li><li class="progresssection"><a href="5-scn.html">scn</a></li><li class="progresssection"><a href="5-mlt.html">mlt</a></li><li class="progresssection"><a href="5-uo.html">uo</a></li><li class="progresssection"><a href="5-vrb.html">vrb</a></li><li class="progresssection"><a href="5-tst.html">tst</a></li><li class="progresschapter"><a href="6-erms.html">6</a></li><li class="progressnext"><a href="5-ins.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

